/**
 * 商品列表页面接口
 */
import Ajax from "./Ajax"
/**
 * 食品列表
 * @param {{type:string,page:num,size:num}} params 
 * @returns 
 */
 function foodListApi(params) {
    return Ajax({
        url:'/food/type',
        method: 'GET',
        params
    })
}

/**
 * 个护清洁列表
 * @param {{type:string,page:num,size:num}} params 
 * @returns 
 */
 function clearListApi(params) {
    return Ajax({
        url:'/clear/type',
        method: 'GET',
        params
    })
}

/**
 * 医药保健列表
 * @param {{type:string,page:num,size:num}} params 
 * @returns 
 */
 function medicalListApi(params) {
    return Ajax({
        url:'/medical/type',
        method: 'GET',
        params
    })
}

/**
 * 添加购物车接口
 * @data {{userId: '', price: number, id: string, time: string, count: 1,name: string, detailaddress: string, bgUrl: string}} data 
 * @returns 
 */
function addCartApi(data) {
    return Ajax({
        url:'/cart/add',
        data
    })
}
export {
    foodListApi,
    clearListApi,
    medicalListApi,
    addCartApi
}